//
//  FenxiaoHeaderView.m
//  1243
//
//  Created by apple on 16/7/19.
//  Copyright © 2016年 1243. All rights reserved.
//

#import "FenxiaoHeaderView.h"

@implementation FenxiaoHeaderView

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        
        self.backgroundColor = [UIColor colorWithRed:45/255.0   green:87/255.0 blue:228/255.0 alpha:1];
        
        self.leijiLB = [[UILabel alloc]initWithFrame:CGRectMake(35, 15, 100, 20)];
        self.leijiLB.textColor = [UIColor whiteColor];
        self.leijiLB.text = @"累计佣金";
        self.leijiLB.font = [UIFont systemFontOfSize:18];
        
        self.mAllMoneyLB = [[UILabel alloc]initWithFrame:CGRectMake(35, 40, 100, 25)];
        self.mAllMoneyLB.text = @"0.00";
        self.mAllMoneyLB.textColor = [UIColor whiteColor];
        self.mAllMoneyLB.font = [UIFont systemFontOfSize:22];

        
        self.tixianLB = [[UILabel alloc]initWithFrame:CGRectMake(35, 90, 100, 20)];
        self.tixianLB.text = @"可提现佣金";
        self.tixianLB.textColor = [UIColor whiteColor];
        self.tixianLB.font = [UIFont systemFontOfSize:18];

        self.mTixianMoneyLB = [[UILabel alloc]initWithFrame:CGRectMake(35, 115, 100, 20)];
        self.mTixianMoneyLB.text = @"0.00";
        self.mTixianMoneyLB.textColor = [UIColor whiteColor];
        self.mTixianMoneyLB.font = [UIFont systemFontOfSize:22];

        
        self.mTixianBut = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.mTixianBut setBackgroundColor:[UIColor colorWithRed:45/255.0   green:87/255.0 blue:228/255.0 alpha:1]];
        [self.mTixianBut setTitle:@"提现" forState:UIControlStateNormal];
        [self.mTixianBut setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        self.mTixianBut.frame = CGRectMake(WIDTH - 90, frame.size.height - 50, 70, 30);
        self.mTixianBut.layer.masksToBounds = YES;
        self.mTixianBut.layer.borderWidth = 1;
        self.mTixianBut.layer.cornerRadius = 5;
        self.mTixianBut.layer.borderColor = [[UIColor whiteColor] CGColor];
        [self.mTixianBut addTarget:self action:@selector(TixianAction:) forControlEvents:UIControlEventTouchUpInside];
        
        
        [self addSubview:self.leijiLB];
        [self addSubview:self.mAllMoneyLB];
        [self addSubview:self.tixianLB];
        [self addSubview:self.mTixianMoneyLB];
        [self addSubview:self.mTixianBut];
    }
    return self;
}

- (void)TixianAction:(UIButton *)sender {
    if (self.TixianBlock) {
        self.TixianBlock();
    }
}

@end
